#include<bits/stdc++.h>
using namespace std;
string s;
int ans;
bool check(char c){
	if(c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y'){
		return true;
	}
	return false;
}
int main(){
	freopen("grasshopper.in" , "r" , stdin);
	freopen("grasshopper.out" , "w" , stdout);
	cin >> s;
	int pre = -1;
	int len = s.size();
	for(int i = 0 ; i < len ; i++){
		if(check(s[i])){
			ans = max(ans , i - pre);
			pre = i;
		}
	}
	int e = len - pre;
	ans = max(ans , e);
	cout << ans << endl;
	return 0;
}
